﻿@model Beauty.Web.Models.LoginModel

@{
    ViewBag.Title = "Log in";
}

<script>

    function RefreshValidateCode(obj) {
        obj.src = "/Account/ValidateCode/" + Math.floor(Math.random() * 10000);
    }
</script>

<section id="loginForm">

@using (Html.BeginForm("login", "account", new { returnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary("", new { @class = "text-error" })

     <div class="control-group">
        @*<label class="control-label" for="inputEmail">Email</label>*@
        @Html.LabelFor(m => m.UserName, new { @class = "control-label" })
        <div class="controls">
            @*<input type="text" id="inputEmail" placeholder="Email">*@
            @Html.TextBoxFor(m => m.UserName)

        </div>
    </div>
    <div class="control-group">
        @*<label class="control-label" for="inputEmail">Email</label>*@
        @Html.LabelFor(m => m.Password, new { @class = "control-label" })
        <div class="controls">
            @*<input type="text" id="inputEmail" placeholder="Email">*@
            @Html.PasswordFor(m => m.Password)

        </div>
    </div>
     <div class="control-group">
        @*<label class="control-label" for="inputEmail">Email</label>*@
        @Html.Label("验证码", new { @class = "control-label" })
        <div class="controls">
            @*<input type="text" id="inputEmail" placeholder="Email">*@
            @Html.TextBox("code")
            <img alt="点击刷新验证码！" title="点击刷新验证码！" src="/account/ValidateCode" style="cursor: pointer;"
                onclick="RefreshValidateCode(this);" />
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
    <input type="submit" value="登录" class="btn" /> @Html.ActionLink("注册", "Register", "account", new { @class = "btn" }) @Html.ActionLink("忘记密码？", "ForgetPassword", "account", new { @class = "btn" }) 
            </div>
    </div>
}
</section>


